#!/bin/python
import pandas as pd
import numpy as np
import sys
from time import gmtime, strftime

path = sys.argv[1]
#pre_recal = pd.read_csv(path,header=None,sep=' ',names=['0_p','0_r','0.1_p','0.1_r','0.2_p','0.2_r','0.3_p','0.3_r','0.4_p','0.4_r','0.5_p','0.5_r','0.6_p','0.6_r','0.7_p','0.7_r','0.8_p','0.8_r','0.9_p','0.9_r','1_p','1_r'])
pre_recal = pd.read_csv(path,header=None,sep=' ')
mean = pre_recal.mean()
pre_recal_mean = pre_recal.append(mean, ignore_index=True)
pre_recal_mean.to_csv(path,sep = ' ',header=False,index=False)